#include <stdbool.h>
#include "app_entry.h"
#include "da_softbus_handler.h"
#include "communication_task.h"
#include "maintask.h"
// #include "khlink_lite_interface.h"

extern bool GetSoftbusSwitchInfowith(void);

void AppRunningEntry(void)
{
    printf("***************Running AppRunningEntry***************\n");
    osDelay(2000U);
    // MainTaskInit();
    CommunicationTaskStart();
// #ifdef NETCONFIG_START
//     // KhLinkStart();     //Do not run netconfig feature.
// #endif
    if(GetSoftbusSwitchInfowith() == true){
        #ifdef DSOFTBUS_AND_DEVICEAUTH_START
            AppDaSoftbusStart();    //Running DA and softbus feature
        #endif

        #ifdef IS_UART485_ENABLE
            AppUart485TaskStart();  //Running 485 task through Uart
        #endif

        #ifdef IS_ETH_ENABLE
            //EthernetDemo();  //Running eth task
        #endif

        #ifdef IS_SOFTBUS_ENABLE
            // SoftbusDemo();  //Running wifi task
        #endif

        #ifdef IS_SOCKET_ENABLE
            StartSocketTask();
        #endif
    }else
    {
        printf("not open softbus.\r\n");
    }
#ifdef IPERF_ENABLE
void AppStartIperfTools(void);
    AppStartIperfTools();     //Do not run netconfig feature.
#endif
}

